-
Notifications
You must be signed in to change notification settings - Fork 6.1k
8351487: [ubsan] jvmti.h runtime error: load of value which is not a valid value #26159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
👋 Welcome back mbaesken! A progress list of the required criteria for merging this PR into |
❗ This change is not yet ready to be integrated. |
Webrevs
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is somewhat of an odd situation. SetVerboseFlag() says the argument type is an enum, but it treats it like an int and does error checking to make sure it one of the enum values. If ubsan dug a little deeper to see how the argument is handled, it would see that and not complain.
test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetErrorName/geterrname002/TestDescription.java
Show resolved
Hide resolved
test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetVerboseFlag/setvrbflag002/TestDescription.java
Show resolved
Hide resolved
@@ -35,6 +35,9 @@ | |||
* JVMTI_ERROR_NULL_POINTER if name_ptr is NULL. | |||
* COMMENTS | |||
* | |||
* @requires !vm.ubsan | |||
* @comment We test with arguments out of scope of the jvmti enums, this causes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please place the comments before @requires
tags
* @comment We test with arguments out of scope of the jvmti enums, this causes | ||
* ubsan issues. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* @comment We test with arguments out of scope of the jvmti enums, this causes | |
* ubsan issues. | |
* @comment We test with arguments out of scope of the jvmti enums, which causes | |
* ubsan issues. |
* @comment We test with arguments out of scope of the jvmti enums, this causes | ||
* ubsan issues. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* @comment We test with arguments out of scope of the jvmti enums, this causes | |
* ubsan issues. | |
* @comment We test with arguments out of scope of the jvmti enums, which causes | |
* ubsan issues. |
When running with ubsan - enabled binaries, the following 2 issues are observed in jvmti.h (on macOS aarch64).
So the problem reported is SetVerboseFlag method (which is part of the VM) calls SetVerboseFlag function with that bad argument ; but the test code seems to intentionally use 'bad' arguments . But this does not work well with ubsan ; so better exclude those tests from ubsan checking .
Please note that jvmti.h is shipped so adding some macros/attributes to methods for avoiding ubsan is probably not the best thing to do in this case.
Progress
Issue
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/26159/head:pull/26159
$ git checkout pull/26159
Update a local copy of the PR:
$ git checkout pull/26159
$ git pull https://git.openjdk.org/jdk.git pull/26159/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 26159
View PR using the GUI difftool:
$ git pr show -t 26159
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/26159.diff
Using Webrev
Link to Webrev Comment